try {
	uni.setStorageSync('QQ_MAP_KEY', 'SO7BZ-NYNLT-HHEXI-VN4YP-5XH33-TVBDD')
} catch (e) {}
import App from './App'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

function loadAMap() {
	return new Promise((resolve, reject) => {
		if (window.AMap) return resolve(window.AMap)
		const script = document.createElement('script')
		script.src = 'https://webapi.amap.com/maps?v=1.4.15&key=513b1046a23cd4e7cbbd86bcfa6bfbc8'
		script.onload = () => resolve(window.AMap)
		script.onerror = () => reject(new Error('高德地图 SDK 加载失败'))
		document.head.appendChild(script)
	})
}
// vue2执行
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'

loadAMap().then(amap => {
	window.AMap = amap
}).catch(console.error)
const app = new Vue({
	...App
})
require('@/utils/request.js')(app)
app.$mount()
// #endif

// vue3执行
// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif